<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="head.jsp" />
<link rel="stylesheet" type="text/css" href="${path}/css/monitor-user.min.css?" />
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="main" title="Go to Home" class="tip-bottom"><i
				class="icon-home"></i> Home</a> <a href="#" class="current">Monitor Users</a>
		</div>
		<c:if test="${not empty return_msg}">
		   <c:if test="${result == 'success'}">
		     <div class="alert alert-success alert-block"> <a class="close" data-dismiss="alert" href="#">×</a>
               <h4 class="alert-heading"><c:out value="${result}"></c:out>!</h4> <c:out value="${return_msg}"></c:out>.
             </div>
		   </c:if>
		   <c:if test="${result == 'fail'}">
		     <div class="alert alert-error alert-block"> <a class="close" data-dismiss="alert" href="#">×</a>
                <h4 class="alert-heading"><c:out value="${result}"></c:out>!</h4> <c:out value="${return_msg}"></c:out>.
              </div>
		   </c:if>
        </c:if>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"><i class="icon-th"></i></span>
						<div class="buttons">
							&nbsp;<a href="userAction" class="btn btn-inverse btn-mini">
							<i class="icon-plus icon-white"></i>Add new User</a>
						</div>
					</div>
					<div class="widget-content nopadding">
						<table class="table table-bordered data-table">
							<thead>
								<tr>
									<th>用户名</th>
									<th>邮箱地址</th>
									<th>手机号码</th>
									<th>用户类型</th>
									<th>紧急联系人</th>
									<th>邮箱配额</th>
									<th>手机配额</th>
									<th>创建时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${items}" var="item">
									<tr>
										<td align="center">${item.userName}</td>
										<td>${item.userEmail}</td>
										<td>${item.phoneNum}</td>
										<td>
										    <c:if test="${item.userType=='0'}">
											   一般用户
											</c:if>
											<c:if test="${item.userType=='1'}">
											   超级用户
											</c:if>
										</td>
										<td>
											<c:if test="${item.isEmergencyUser=='0'}">
											   是
											</c:if>
											<c:if test="${item.isEmergencyUser=='1'}">
											   否
											</c:if>
										</td>
										<td>${item.emailLimitNum}</td>
										<td>${item.phoneLimitNum}</td>
										<td><fmt:formatDate value="${item.createTime}" type="both"/></td>
										<td><a href="userAction?id=${item.id}" class="btn btn-success"> Edit</a></td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="footer.jsp" />
<script src="${path}/js/monitor-user.min.js"></script>
</body>
</html>